<?php $path = 'instls/mods/' . basename(dirname(__FILE__)); ?>
<style>
.login_title {
  height: 50px;
  text-align: left;
  font-weight: 600;
  font-size: 20px;
  font-family: Trebuchet MS;
}
.account_td {
  width: 200px;
  height: 20px;
  text-align: left;
  font-weight: 400;
  font-size: 15px;
  font-family: Trebuchet MS;
  padding: 2px 0;
}
.password_td {
  width: 200px;
  height: 20px;
  text-align: left;
  font-weight: 400;
  font-size: 15px;
  font-family: Trebuchet MS;
  padding: 2px 0;
}
.login_input {
  width: 250px;
  height: 18px;
  font-family: Trebuchet MS;
}
.login_table {
  width: 700px;
  height: 300px;
}
</style>
<table cellpadding=0 cellspacing=0 width="250px">
  <tr><td class="login_title">Sign In</td></tr>
  <tr><td class="account_td">Account</td></tr>
  <tr><td><input id="email" type="text" class="login_input"></input></td></tr>
  <tr><td class="password_td">Password</td></tr>
  <tr><td><input id="password" type="password" class="login_input"></input></td></tr>
</table>
<div>&nbsp;</div>
<div class="image_button" onclick="login();">Login</div>
<script type="text/javascript" src="libs/jquery/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
  function login() {
    var obj = {
      email: $('#email')[0].value,
      password: $('#password')[0].value
    };
    $.ajax({
      type: 'POST',
      url: '<?php echo $path . '/' . basename(__FILE__, '.php'); ?>.server.php',
      data: 'action=login&q=' + encodeURIComponent(JSON.stringify(obj)),
      success: function(msg){
        try {
          if (JSON.parse(msg).length > 0) {
            location.href = '<?php echo ($url) ? $url : '?mod=systems&menu=systems'; ?>';
          }
        } catch (ex) {
        }
      }
    });
  }
</script>